# def add(x, y):
#     print('x:', x)
#     print('y:', y)
#     return x + y


# print(add(y=2, x=1))
# print(add(1, 2))


# def show(x, y):
#     return x, y
#
#
#
# # 序列解包
# r1, r2 = show(11, 22)
# print(r1, r2)
#
# # 元祖序号
# result = show(1, 2)
# print(result[0], result[1])
#
# a, b, c = 1, 2, 3
#
# print('a:', a, 'b:', b, 'c:', c)
#
# d = 4, 5, 6
# print('d:', d)
# x, y, z = d
# print('x:', x, 'y:', y, 'z:', z)


# def print_student_files(nane, gender, age=18, college='北京大学'):
#     print('name:', nane)
#     print('gender:', gender)
#     print('我今年:' + str(age) + '岁')
#     print('college:', college)
#
#
# print_student_files(nane='张三', gender='男', age=18, college='北京大学')
# print_student_files(nane='李四', gender='女')
# print_student_files(nane='王五', gender='男', age=19)
# print_student_files('赵六', '男', college='南京大学')


def demo(*params):
    print(params)
    print(type(params))


def demo2(param):
    print(param)
    print(type(param))


demo(1, 2, 3, 4)

# 传递元组，加*号后可以作为一个参数进行解包
a = (1, 2, 3, 4)
demo(*a)


# demo2((1, 2, 3, 4))
